MVCC is a locking mechanism widely used in a database system. This mechanism is used in current mainstream business database systems such as an Oracle database (a database developed by ORACLE), a structured query language server (SQL SERVER) database, and a PostgreSQL database.
Generally, a MVCC scheme includes two implementation types, one is a page-level multi-version type, and the other is a row-level multi-version type. The page-level multi-version indicates that a timestamp is recorded and modified on a page, and the page needs to be accessed according to the timestamp. If the timestamp does not meet a requirement, a proper page version needs to be constructed. In this way, a same page may correspond to a plurality of different versions in a database. The row-level multi-version indicates that a new version is generated whenever a record is updated. In this way, a read operation and a write operation on a same record may access different versions of the record such that reading and writing are not blocked.
During study and practice of the prior art, the inventor of the present disclosure discovers that, when a version page obtained is read, the page needs to be read according to information about all transactions on the page. If there are many transactions on the page, efficiency of reading the data page is not high, and the reading is inconvenient.